{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Probabilities of Events in Stocks with Risks and and Return"
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "For machine learning and deep learning, probability is important to learn and understand. "
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "# Library\n",
        "import pandas as pd\n",
        "import numpy as np\n",
        "import math\n",
        "\n",
        "import matplotlib.pyplot as plt\n",
        "import seaborn as sns\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "import fix_yahoo_finance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "stock_name = 'AAPL'\n",
        "start = '2018-01-01' \n",
        "end = '2019-01-01'\n",
        "df = yf.download(stock_name, start, end)\n",
        "df = df.reset_index()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 downloaded\n"
          ]
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "df.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 3,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Date</th>\n",
              "      <th>Open</th>\n",
              "      <th>High</th>\n",
              "      <th>Low</th>\n",
              "      <th>Close</th>\n",
              "      <th>Adj Close</th>\n",
              "      <th>Volume</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>2018-01-02</td>\n",
              "      <td>170.160004</td>\n",
              "      <td>172.300003</td>\n",
              "      <td>169.259995</td>\n",
              "      <td>172.259995</td>\n",
              "      <td>168.987320</td>\n",
              "      <td>25555900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>2018-01-03</td>\n",
              "      <td>172.529999</td>\n",
              "      <td>174.550003</td>\n",
              "      <td>171.960007</td>\n",
              "      <td>172.229996</td>\n",
              "      <td>168.957886</td>\n",
              "      <td>29517900</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>2018-01-04</td>\n",
              "      <td>172.539993</td>\n",
              "      <td>173.470001</td>\n",
              "      <td>172.080002</td>\n",
              "      <td>173.029999</td>\n",
              "      <td>169.742706</td>\n",
              "      <td>22434600</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>2018-01-05</td>\n",
              "      <td>173.440002</td>\n",
              "      <td>175.369995</td>\n",
              "      <td>173.050003</td>\n",
              "      <td>175.000000</td>\n",
              "      <td>171.675278</td>\n",
              "      <td>23660000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>2018-01-08</td>\n",
              "      <td>174.350006</td>\n",
              "      <td>175.610001</td>\n",
              "      <td>173.929993</td>\n",
              "      <td>174.350006</td>\n",
              "      <td>171.037628</td>\n",
              "      <td>20567800</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "        Date        Open        High         Low       Close   Adj Close  \\\n",
              "0 2018-01-02  170.160004  172.300003  169.259995  172.259995  168.987320   \n",
              "1 2018-01-03  172.529999  174.550003  171.960007  172.229996  168.957886   \n",
              "2 2018-01-04  172.539993  173.470001  172.080002  173.029999  169.742706   \n",
              "3 2018-01-05  173.440002  175.369995  173.050003  175.000000  171.675278   \n",
              "4 2018-01-08  174.350006  175.610001  173.929993  174.350006  171.037628   \n",
              "\n",
              "     Volume  \n",
              "0  25555900  \n",
              "1  29517900  \n",
              "2  22434600  \n",
              "3  23660000  \n",
              "4  20567800  "
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "rets = df['Adj Close'].pct_change().dropna()\n",
        "rets.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": [
              "1   -0.000174\n",
              "2    0.004645\n",
              "3    0.011385\n",
              "4   -0.003714\n",
              "5   -0.000115\n",
              "Name: Adj Close, dtype: float64"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "Positive = [x for x in rets if x >= 0]\n",
        "Positive "
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 5,
          "data": {
            "text/plain": [
              "[0.004645062853118276,\n",
              " 0.011385302176106338,\n",
              " 0.005680185070940924,\n",
              " 0.01032637688858662,\n",
              " 0.016516209809796845,\n",
              " 0.0008933086700184667,\n",
              " 0.00022593650005453547,\n",
              " 0.0023376442349785087,\n",
              " 0.00275490819060642,\n",
              " 0.002090446970163695,\n",
              " 0.04179154076879055,\n",
              " 0.012231496255121321,\n",
              " 0.04027873964320405,\n",
              " 0.010017778672159805,\n",
              " 0.018437319086991977,\n",
              " 0.03357838015548387,\n",
              " 0.008359069294464838,\n",
              " 0.017391295238289084,\n",
              " 0.019772166121068357,\n",
              " 0.006914358348526939,\n",
              " 0.003461745204928812,\n",
              " 0.010912389488991536,\n",
              " 0.017180943808731808,\n",
              " 0.00966771204944239,\n",
              " 0.0011768533817844151,\n",
              " 0.047471966381662734,\n",
              " 0.0078087483725906015,\n",
              " 0.01025911145040248,\n",
              " 0.01912239139466898,\n",
              " 0.006934224074965689,\n",
              " 0.0099179869818804,\n",
              " 0.018817928649396576,\n",
              " 0.009858400311298698,\n",
              " 0.003388138598183099,\n",
              " 0.006238211413460926,\n",
              " 0.01376404770442674,\n",
              " 0.004357370433198282,\n",
              " 0.0034831132020165523,\n",
              " 0.018112284744737694,\n",
              " 0.023236140102975922,\n",
              " 0.04417512206515806,\n",
              " 0.0018122237862276958,\n",
              " 0.03923341433915395,\n",
              " 0.007234903443708918,\n",
              " 0.0048067193699881106,\n",
              " 0.007041158406455361,\n",
              " 0.014303919588982472,\n",
              " 0.0093326467329502,\n",
              " 0.007084915173241058,\n",
              " 0.006411510552087218,\n",
              " 0.002285422579895169,\n",
              " 0.01803404079406068,\n",
              " 0.008357772060744617,\n",
              " 0.007715174133366309,\n",
              " 0.00346591132594698,\n",
              " 0.005490682955860748,\n",
              " 0.0005243682284814533,\n",
              " 0.004362144039866012,\n",
              " 0.012405956049157396,\n",
              " 0.007276224563457445,\n",
              " 0.011182370537070607,\n",
              " 0.00804698735678433,\n",
              " 0.013862086680582753,\n",
              " 0.013885098272180985,\n",
              " 0.016766007816417128,\n",
              " 0.0015704665424811637,\n",
              " 0.00282855408532523,\n",
              " 0.007773198770833378,\n",
              " 0.0008879807228239223,\n",
              " 0.007254343647488115,\n",
              " 0.009430082806804352,\n",
              " 0.0020008902513937166,\n",
              " 0.05891008590697444,\n",
              " 0.029230800719169725,\n",
              " 0.002893164888259525,\n",
              " 0.005192545171162077,\n",
              " 0.0006759500895814341,\n",
              " 0.007864881939228185,\n",
              " 0.006456960067914519,\n",
              " 0.00421309253302371,\n",
              " 0.0023360904995095577,\n",
              " 0.014649994729746929,\n",
              " 0.019969960760374716,\n",
              " 4.648107451932226e-05,\n",
              " 0.0020460469760856803,\n",
              " 0.0031091504198892395,\n",
              " 0.008234707414026987,\n",
              " 0.008075586965733406,\n",
              " 0.014929390572101076,\n",
              " 0.009193722524358572,\n",
              " 0.011554014774433519,\n",
              " 0.003206935860910809,\n",
              " 0.025282872102698084,\n",
              " 0.024155236664021862,\n",
              " 0.0016522475526121738,\n",
              " 0.0005956895036045573,\n",
              " 0.007601810348180527,\n",
              " 0.014380120341844327,\n",
              " 0.006340943773434526,\n",
              " 0.0205516469859226,\n",
              " 0.0035119535536598523,\n",
              " 0.006733377224007908,\n",
              " 0.008888497861244682,\n",
              " 0.012168554776654128,\n",
              " 0.013853466663148906,\n",
              " 0.03571936009276455,\n",
              " 0.022037101115392588,\n",
              " 0.015230130216397297,\n",
              " 0.0061099886835944694,\n",
              " 0.009426708010797924,\n",
              " 0.02189783378301824,\n",
              " 0.004994277484854592,\n",
              " 0.026066533610910048,\n",
              " 0.015352265824456257,\n",
              " 0.010814130266645794,\n",
              " 0.030328186121508338,\n",
              " 0.02467881656113513,\n",
              " 0.01107570341533215,\n",
              " 0.013523729493583492,\n",
              " 0.03845269874977042,\n",
              " 0.03494229807667337,\n",
              " 0.006587899252381568,\n",
              " 0.0027872275236049404,\n",
              " 0.010940190720670095,\n",
              " 0.012992595639868654,\n",
              " 0.07042153698489817,\n",
              " 0.0005123770514712245,\n",
              " 0.00966526577494542]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 5,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "len(Positive)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 6,
          "data": {
            "text/plain": [
              "128"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 6,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "Negative = [x for x in rets if x <= 0]\n",
        "Negative"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 7,
          "data": {
            "text/plain": [
              "[-0.00017417874903269404,\n",
              " -0.003714279699608136,\n",
              " -0.00011472914018662017,\n",
              " -0.00022947876160750447,\n",
              " -0.005082090074120416,\n",
              " -0.0044627275050476145,\n",
              " -0.008181131441761247,\n",
              " -0.015928659185317384,\n",
              " -0.017851018500488647,\n",
              " -0.020698435621005484,\n",
              " -0.005894166556026814,\n",
              " -0.04339016474134738,\n",
              " -0.02498427047772933,\n",
              " -0.021407078052592565,\n",
              " -0.02751649918191268,\n",
              " -0.003237206503909129,\n",
              " -0.0033637031067932366,\n",
              " -0.004538806817489527,\n",
              " -0.0032407000738997604,\n",
              " -0.0015136836889383387,\n",
              " -0.017516237394228806,\n",
              " -0.0008483249811734872,\n",
              " -0.00928284337059504,\n",
              " -0.009630216674637482,\n",
              " -0.008501401190699198,\n",
              " -0.003526410077728026,\n",
              " -0.015279072134138039,\n",
              " -0.000342345223522722,\n",
              " -0.022654680173382014,\n",
              " -0.014129707480310727,\n",
              " -0.023156702989311606,\n",
              " -0.02564111438636152,\n",
              " -0.011049095652676644,\n",
              " -0.006556172256882542,\n",
              " -0.02557857286857257,\n",
              " -0.004675242770705079,\n",
              " -0.002244236404391642,\n",
              " -0.028340053191079018,\n",
              " -0.04097226663678033,\n",
              " -0.002896405591983342,\n",
              " -0.013919057331441498,\n",
              " -0.011569867258593436,\n",
              " -0.0038032503949564367,\n",
              " -0.0023331155342698473,\n",
              " -0.009088465955687686,\n",
              " -0.006323623747345519,\n",
              " -0.0036365329702382487,\n",
              " -0.002504850442284212,\n",
              " -0.0011148494563972822,\n",
              " -0.0036058718211751106,\n",
              " -0.0021288898798234035,\n",
              " -0.003359980472911528,\n",
              " -0.002680606879053915,\n",
              " -0.009097534238967309,\n",
              " -0.0024516697337443327,\n",
              " -0.008217177336348191,\n",
              " -0.010272547814148547,\n",
              " -0.0005294527321810794,\n",
              " -0.01615987935487373,\n",
              " -0.005576405047457378,\n",
              " -0.0029117569514484076,\n",
              " -0.014871178936190388,\n",
              " -0.001463921488838782,\n",
              " -0.0021023615765110026,\n",
              " -0.01741636392307433,\n",
              " -0.0012068853639963795,\n",
              " -0.012976029727915672,\n",
              " -0.0021951771192413316,\n",
              " -0.0054845374304276495,\n",
              " -0.0022931115314142048,\n",
              " -0.00313107610108998,\n",
              " -0.016631613984884885,\n",
              " -0.005602594209034639,\n",
              " -0.009374859855314388,\n",
              " -0.002978612865908725,\n",
              " -0.009743474498980165,\n",
              " -0.0019493677860732417,\n",
              " -0.006524815056797473,\n",
              " -0.016617367789982906,\n",
              " -0.008068156903119239,\n",
              " -0.013420705139917,\n",
              " -0.01241901139239987,\n",
              " -0.011351217151720605,\n",
              " -0.02662607700449915,\n",
              " -0.010771241986213154,\n",
              " -0.007966172447626207,\n",
              " -0.017580881667636605,\n",
              " -0.016228838360415998,\n",
              " -0.002318413561258059,\n",
              " -0.04632600953864263,\n",
              " -0.008827960240492705,\n",
              " -0.02138580921414479,\n",
              " -0.0043213337617340475,\n",
              " -0.023373628677878067,\n",
              " -0.03430159828375201,\n",
              " -0.015923614467077574,\n",
              " -0.018770109471245355,\n",
              " -0.06633067882993848,\n",
              " -0.028388268042047415,\n",
              " -0.0034890087055076124,\n",
              " -0.019281525299259417,\n",
              " -0.050374201085864656,\n",
              " -0.009991254302829655,\n",
              " -0.028247349591416726,\n",
              " -0.03963213711017677,\n",
              " -0.04777794641405342,\n",
              " -0.0011300491271354351,\n",
              " -0.025398799051646326,\n",
              " -0.0021761239987400094,\n",
              " -0.00768209893274896,\n",
              " -0.005402357807220426,\n",
              " -0.0439887183842137,\n",
              " -0.011149503663147375,\n",
              " -0.035656994267334374,\n",
              " -0.005719388976504924,\n",
              " -0.03199765855889225,\n",
              " -0.009306215633277715,\n",
              " -0.03119168339337297,\n",
              " -0.02523464505739026,\n",
              " -0.03889567604019706,\n",
              " -0.025873993139307494,\n",
              " -0.006489864044333715]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 7,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "len(Negative)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 8,
          "data": {
            "text/plain": [
              "122"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 8,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "Neutral = [ x if x in Negative else 0 for x in range(1,128)]\n",
        "Neutral"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 9,
          "data": {
            "text/plain": [
              "[0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0,\n",
              " 0]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 9,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Each needs same lengths\n",
        "Positive = Positive[:100] \n",
        "Negative = Negative[:100]\n",
        "Neutral = Neutral[:100]"
      ],
      "outputs": [],
      "execution_count": 10,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "Markov_Models = pd.DataFrame({'Bear': Negative,'Bull': Positive, 'Neutral':Neutral})\n",
        "Markov_Models"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 11,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Bear</th>\n",
              "      <th>Bull</th>\n",
              "      <th>Neutral</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>-0.000174</td>\n",
              "      <td>0.004645</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>-0.003714</td>\n",
              "      <td>0.011385</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>-0.000115</td>\n",
              "      <td>0.005680</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>-0.000229</td>\n",
              "      <td>0.010326</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>-0.005082</td>\n",
              "      <td>0.016516</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>-0.004463</td>\n",
              "      <td>0.000893</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>-0.008181</td>\n",
              "      <td>0.000226</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>-0.015929</td>\n",
              "      <td>0.002338</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>-0.017851</td>\n",
              "      <td>0.002755</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>-0.020698</td>\n",
              "      <td>0.002090</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>-0.005894</td>\n",
              "      <td>0.041792</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>-0.043390</td>\n",
              "      <td>0.012231</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>-0.024984</td>\n",
              "      <td>0.040279</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>-0.021407</td>\n",
              "      <td>0.010018</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14</th>\n",
              "      <td>-0.027516</td>\n",
              "      <td>0.018437</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>-0.003237</td>\n",
              "      <td>0.033578</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>16</th>\n",
              "      <td>-0.003364</td>\n",
              "      <td>0.008359</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>17</th>\n",
              "      <td>-0.004539</td>\n",
              "      <td>0.017391</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18</th>\n",
              "      <td>-0.003241</td>\n",
              "      <td>0.019772</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>19</th>\n",
              "      <td>-0.001514</td>\n",
              "      <td>0.006914</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>20</th>\n",
              "      <td>-0.017516</td>\n",
              "      <td>0.003462</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21</th>\n",
              "      <td>-0.000848</td>\n",
              "      <td>0.010912</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>22</th>\n",
              "      <td>-0.009283</td>\n",
              "      <td>0.017181</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>23</th>\n",
              "      <td>-0.009630</td>\n",
              "      <td>0.009668</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>24</th>\n",
              "      <td>-0.008501</td>\n",
              "      <td>0.001177</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25</th>\n",
              "      <td>-0.003526</td>\n",
              "      <td>0.047472</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>26</th>\n",
              "      <td>-0.015279</td>\n",
              "      <td>0.007809</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>27</th>\n",
              "      <td>-0.000342</td>\n",
              "      <td>0.010259</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>28</th>\n",
              "      <td>-0.022655</td>\n",
              "      <td>0.019122</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>29</th>\n",
              "      <td>-0.014130</td>\n",
              "      <td>0.006934</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>70</th>\n",
              "      <td>-0.003131</td>\n",
              "      <td>0.009430</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>71</th>\n",
              "      <td>-0.016632</td>\n",
              "      <td>0.002001</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>72</th>\n",
              "      <td>-0.005603</td>\n",
              "      <td>0.058910</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>73</th>\n",
              "      <td>-0.009375</td>\n",
              "      <td>0.029231</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>74</th>\n",
              "      <td>-0.002979</td>\n",
              "      <td>0.002893</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>75</th>\n",
              "      <td>-0.009743</td>\n",
              "      <td>0.005193</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>76</th>\n",
              "      <td>-0.001949</td>\n",
              "      <td>0.000676</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>77</th>\n",
              "      <td>-0.006525</td>\n",
              "      <td>0.007865</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>78</th>\n",
              "      <td>-0.016617</td>\n",
              "      <td>0.006457</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>79</th>\n",
              "      <td>-0.008068</td>\n",
              "      <td>0.004213</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>80</th>\n",
              "      <td>-0.013421</td>\n",
              "      <td>0.002336</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>81</th>\n",
              "      <td>-0.012419</td>\n",
              "      <td>0.014650</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>82</th>\n",
              "      <td>-0.011351</td>\n",
              "      <td>0.019970</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>83</th>\n",
              "      <td>-0.026626</td>\n",
              "      <td>0.000046</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>84</th>\n",
              "      <td>-0.010771</td>\n",
              "      <td>0.002046</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>85</th>\n",
              "      <td>-0.007966</td>\n",
              "      <td>0.003109</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>86</th>\n",
              "      <td>-0.017581</td>\n",
              "      <td>0.008235</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>87</th>\n",
              "      <td>-0.016229</td>\n",
              "      <td>0.008076</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>88</th>\n",
              "      <td>-0.002318</td>\n",
              "      <td>0.014929</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>89</th>\n",
              "      <td>-0.046326</td>\n",
              "      <td>0.009194</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>90</th>\n",
              "      <td>-0.008828</td>\n",
              "      <td>0.011554</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>91</th>\n",
              "      <td>-0.021386</td>\n",
              "      <td>0.003207</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>92</th>\n",
              "      <td>-0.004321</td>\n",
              "      <td>0.025283</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>93</th>\n",
              "      <td>-0.023374</td>\n",
              "      <td>0.024155</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>94</th>\n",
              "      <td>-0.034302</td>\n",
              "      <td>0.001652</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>95</th>\n",
              "      <td>-0.015924</td>\n",
              "      <td>0.000596</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>96</th>\n",
              "      <td>-0.018770</td>\n",
              "      <td>0.007602</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>97</th>\n",
              "      <td>-0.066331</td>\n",
              "      <td>0.014380</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>98</th>\n",
              "      <td>-0.028388</td>\n",
              "      <td>0.006341</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>99</th>\n",
              "      <td>-0.003489</td>\n",
              "      <td>0.020552</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>100 rows × 3 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "        Bear      Bull  Neutral\n",
              "0  -0.000174  0.004645        0\n",
              "1  -0.003714  0.011385        0\n",
              "2  -0.000115  0.005680        0\n",
              "3  -0.000229  0.010326        0\n",
              "4  -0.005082  0.016516        0\n",
              "5  -0.004463  0.000893        0\n",
              "6  -0.008181  0.000226        0\n",
              "7  -0.015929  0.002338        0\n",
              "8  -0.017851  0.002755        0\n",
              "9  -0.020698  0.002090        0\n",
              "10 -0.005894  0.041792        0\n",
              "11 -0.043390  0.012231        0\n",
              "12 -0.024984  0.040279        0\n",
              "13 -0.021407  0.010018        0\n",
              "14 -0.027516  0.018437        0\n",
              "15 -0.003237  0.033578        0\n",
              "16 -0.003364  0.008359        0\n",
              "17 -0.004539  0.017391        0\n",
              "18 -0.003241  0.019772        0\n",
              "19 -0.001514  0.006914        0\n",
              "20 -0.017516  0.003462        0\n",
              "21 -0.000848  0.010912        0\n",
              "22 -0.009283  0.017181        0\n",
              "23 -0.009630  0.009668        0\n",
              "24 -0.008501  0.001177        0\n",
              "25 -0.003526  0.047472        0\n",
              "26 -0.015279  0.007809        0\n",
              "27 -0.000342  0.010259        0\n",
              "28 -0.022655  0.019122        0\n",
              "29 -0.014130  0.006934        0\n",
              "..       ...       ...      ...\n",
              "70 -0.003131  0.009430        0\n",
              "71 -0.016632  0.002001        0\n",
              "72 -0.005603  0.058910        0\n",
              "73 -0.009375  0.029231        0\n",
              "74 -0.002979  0.002893        0\n",
              "75 -0.009743  0.005193        0\n",
              "76 -0.001949  0.000676        0\n",
              "77 -0.006525  0.007865        0\n",
              "78 -0.016617  0.006457        0\n",
              "79 -0.008068  0.004213        0\n",
              "80 -0.013421  0.002336        0\n",
              "81 -0.012419  0.014650        0\n",
              "82 -0.011351  0.019970        0\n",
              "83 -0.026626  0.000046        0\n",
              "84 -0.010771  0.002046        0\n",
              "85 -0.007966  0.003109        0\n",
              "86 -0.017581  0.008235        0\n",
              "87 -0.016229  0.008076        0\n",
              "88 -0.002318  0.014929        0\n",
              "89 -0.046326  0.009194        0\n",
              "90 -0.008828  0.011554        0\n",
              "91 -0.021386  0.003207        0\n",
              "92 -0.004321  0.025283        0\n",
              "93 -0.023374  0.024155        0\n",
              "94 -0.034302  0.001652        0\n",
              "95 -0.015924  0.000596        0\n",
              "96 -0.018770  0.007602        0\n",
              "97 -0.066331  0.014380        0\n",
              "98 -0.028388  0.006341        0\n",
              "99 -0.003489  0.020552        0\n",
              "\n[100 rows x 3 columns]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.hist(Negative, 50, normed=True)\n",
        "plt.grid()\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<matplotlib.figure.Figure at 0x23aeac05a58>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEACAYAAABbMHZzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAFktJREFUeJzt3X2MZXddx/H3t922YpXOFtMZpWWHB2kLBkciFeMDV6BS0LSNMRV86gSfUUQx2G0lVo2Rlig0ajAqpFuIpRRBC4qwNt3RmFABYaHQWos6S6nuINQSjaZp7dc/7tnu3Zk7uzPnYc797Xm/kpvcc+55+Ozd2e/c+dy5ZyMzkSQNyyl9B5Ak7TyHvyQNkMNfkgbI4S9JA+Twl6QBcvhL0gCdcPhHxNsiYi0iPjWx7o0RcU9EHIyI90TEEyceuzoi7qse/+6ugkuS6tvKK/8bgZesW7cfeHZmLgH3AVcDRMSzgCuAC4GXAm+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+f+56sfLt272o3OHGuWPiEuB+zPzrq6DTtH4uY+I34yIzwE/CPxqh1mnaeXfbuWVwF+1nvD42sy/U7aSZ7Nttv1nafzbPhHx18D85CrG/8vx66dsXvfd5VfQ0av+jvPvAnZn5vMj4nnArcDTagXdRMf53wL8RmZmRPwm8Cbgx2oF3URX+SPiCcA1wMXrjt2arr/2M/P1wOur/vbVwK/ViLmpnfi3GxG/AjySmTfX2f8Ex96J2TPran9NNx7+mXnxZo9FxFpEzGfmWvWG1RembPYA8JSJ5XOrdUeOcSrwfUAnb7p0nP/zwHur83y0etPxSZn5pZbid5o/M/9jYv0fA+9vIfIxOsz/dGAR+GRERLX+HyLiosycdpxZyr7ezcAHaHn478C/3WXgZcAL20l8rB18/nfKVvI8AJw3ZZvTt7DvMbqufd4HLFf3rwRum7LNR4FnRMSeiDgdeHm13xEXA/dk5r91GXQTTfP/OdUXfkQ8EzitzcG/BY3yr/sNk+8DPt1d1Klq58/MT2fmQmY+LTOfyvgb8Te1Nfi3oOlz/4yJ7S4HdvpzMk3zX8L4vZZLM/Ph7uNu0MbsOWKnev+t5Hkf8KPw+JUUHqrqra3+WY7q+N3rs4HbGX/adz8wV63/WuAvJra7pNrmPmDvumPcCPxklzm7ys/4Xfd3AHcBHwNeUFj+twOfYvybA38OzJeUf92x/oWd/W2fps/9n04897cBX1vSc18tHwI+Xt3eUlj+yxl36P/L+CoFf7VDuTfkAX5qcgYyvlz+Z4FPMvGbSFv5dzB580NekjRA/jeOkjRADn9JGiCHvyQNkMNfkgbI4S9JA+Twl6QBcvhL0gA5/CVpgP4f3ExMGCMz8qoAAAAASUVORK5CYII=\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.hist(Positive, 50, normed=True)\n",
        "plt.grid()\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<matplotlib.figure.Figure at 0x23aeaffadd8>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEACAYAAABbMHZzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAFARJREFUeJzt3W+MZXV9x/H3l11F/rksNuykYhmSprDa1oEmikHjtBhFTIAHDanaxpXGNlHRaNOwtA/ok8bSpHVtbB8YDbvaWgX6R1LbigQujSaIBhAiiDRkV0R3rPKnNRoC8u2De3YZlrk7s+fPnHN+9/1Kbvaec++55/vdM/OdO59z597ITCRJ8+W4vguQJG0+h78kzSGHvyTNIYe/JM0hh78kzSGHvyTNoXWHf0R8KiJWIuLeVeu2R8TNEfFgRHwpIratuu3qiHgoIh6IiDd3Vbgkqb6NPPO/DnjLEet2A7dk5tnArcDVABHxSuByYCfwVuDvIiLaK1eS1IZ1h39mfgV4/IjVlwL7quv7gMuq65cAn8vMZzJzP/AQ8Jp2SpUktaVu5n96Zq4AZOZB4PRq/cuBR1bd79FqnSRpQNo64et7REjSiGytud1KROzIzJWIWAB+WK1/FHjFqvudUa17gYjwB4Yk1ZCZjc+lbvSZf1SXQ24CdlXX3wV8YdX634mIF0fEWcAvA3fOetDMLPZyzTXX9F6D/dnfPPZXcm+Z7T1nXveZf0R8FlgGXhYR3wWuAf4CuCEirgAOMH2FD5l5f0RcD9wPPA28N9usdkT279/fdwmdsr9xK7m/kntr07rDPzPfMeOmN824/0eAjzQpSpLULf/CtyO7du3qu4RO2d+4ldxfyb21KfpKZSJiXhMhSaotIshNPOGrYzSZTPouoVP2N24l91dyb21y+EvSHDL2kaQRMfaRJNXm8O9I6bmj/Y1byf2V3FubHP6SNIfM/CVpRMz8JUm1OfxnWFhYJCLWvCwsLK67fem5o/2NW8n9ldxbm+q+pXPxVlYOMOtjClZW/GRKSeNm5j/D9KOHZ9UXrb61qiRtlJm/JKk2h39HSs8d7W/cSu6v5N7a5PCXpDlk5j+Dmb+kITLzlyTV5vDv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VbwDFyMxnM/Nc4AzgtRHxyr5raktEvA1YqX57C8r8nrwgM89j+tvN+yLi9X0X1KKtwHnA31Y9/hTYfbQNuhj+jwK/tGr5jGrdkfd5xRr32ci2fWvS39A16i0itjId/J/JzC90WGddrRy76tfp24CLOqixiSb9XQBcEhEPM/1Qjd+MiE93WGsdjY5fZv6g+vd/gH9hGrMMSZP+vgc8kpnfqNbfyPSHwWwdnLTYwnMnLV7M9KTFziPuczHPnbQ4n+dOGq67bd+XJv2tun0RuK/vXtrujWkW+dd999HR1+YvANuq6ycA/wVc3HdPbX9tVuvfyDBP+DY5ficCJ1fXTwK+Cry5757aPH7A7cCvVNevAa496v46auIipq/2eAjYXa37Q+APVt3n41Wj3wTOO9q2Q7s07O+zwPeBp4DvUp2dH8qlRm/nVusuAH5efcHeDdwFXNR3P20dO+DXqp7uAe4F/rTvXtr+2lx1+yCHf8Pjd9aqr837Cp0trwa+XvX5z1RPVmZd/CMvSZpDQznhK0naRA5/SZpDDn9JmkMOf0maQw5/SZpDDn9JmkMOf0maQw5/SZpD/w/x2yX/wAmUDwAAAABJRU5ErkJggg==\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 13,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.hist(rets, 100, normed=True)\n",
        "plt.grid()\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<matplotlib.figure.Figure at 0x23aeb0033c8>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAGKVJREFUeJzt3WuMZGd95/Hvb2bMGON4ekzibjZOpgkSNgItjbUxJNHGTWyIl0jYUiJL2ZVCB6Fdoewakyg742QjZ19s4iEJca4v2CXugSUKYAh2rh4sd0XaiIu9uME4Yy8rZ4ZL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0x+As/wjwdeA+Sf+26rVTu8hHxMiiK6mffoXsS1oAht3E/QvA926Zv5rNtswbIuIt6Tj3SXpn3Vwzzvl54IPpOI+kC5vPj4ivtCTji4BF4JOSlJb/b0nXR8TYN9af8lgiaYXBr/I/Mm62Crsed8s63zNknefU2DaXSXKSfmW/D3h3RNzfwow/Abxe0uuA5wLfIeldEfFTLcsJg99+H03T9zG4zjQNk+S8CXg6Ir4KIOmDwA8Cu58gZbqYcBw4mqZHXYTbz+YFh+ew/SLcE8ANafpG4JFcFzoy5XxJeuw/AP81Tb8YONO2jDvW+1sGv3m0cSxvTt/3508hW+X4MPjhsnFx61VsXtyqNbZN50zz7wLePo1suTJuWecGpnvhddKx/CvgxWn6LuB423Iy6Oc/DlzK4LeiVQa/fex+zEzBrwQeYnCF/yQwl5a/APjTLevdnNb5DHBsy/IfBB4FHgM+ArxiSgM8ac5LgHengX6U9IOpTRl37OtppvfumknH8jPAGeAT6ev3M+e74LgMfkj/+y3r/G56wX0SuG6csW0w5yvSsh8C/ikVicfSGN7ckozXDdnHVIt8hu/5y4FH0nh+EDjU0px3MbjI/ikGb3i4pOp4/jCUmVmH+c//mZl1mIu8mVmHucibmXWYi7yZWYe5yJuZdZiLvJlZh7nIm5l1mIu8mVmH/TMrzu7qU9oLrQAAAABJRU5ErkJggg==\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 14,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from scipy.stats import binom\n",
        "n = 5 # number of stocks \n",
        "p = 0.7 # Selecting a stock above 5% returns is 0.70\n",
        "k = 2 # Picking stocks above 5% returns\n",
        "binomial = binom.pmf(k, n, p)\n",
        "binomial"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 15,
          "data": {
            "text/plain": [
              "0.1323"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 15,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Standard Normal Distribution\n",
        "from scipy.stats import norm\n",
        "norm.cdf(rets)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 16,
          "data": {
            "text/plain": [
              "array([ 0.49993051,  0.50185311,  0.50454198,  0.49851822,  0.49995423,\n",
              "        0.49990845,  0.50226605,  0.50411956,  0.49797255,  0.50658871,\n",
              "        0.50035638,  0.49821964,  0.49673624,  0.50009014,  0.49364565,\n",
              "        0.49287885,  0.50093258,  0.49174311,  0.49764858,  0.50109905,\n",
              "        0.50083397,  0.48269526,  0.49003376,  0.51666756,  0.49146046,\n",
              "        0.48902389,  0.50487954,  0.51606455,  0.50399645,  0.50735501,\n",
              "        0.51339332,  0.49870854,  0.49865808,  0.49818928,  0.50333475,\n",
              "        0.50693777,  0.50788744,  0.49870715,  0.49939613,  0.49301239,\n",
              "        0.50275841,  0.50138103,  0.49966157,  0.49629673,  0.50435333,\n",
              "        0.50685387,  0.5038568 ,  0.49615816,  0.49660847,  0.5004695 ,\n",
              "        0.49859317,  0.49390477,  0.49986342,  0.49096286,  0.49436325,\n",
              "        0.49076264,  0.51893146,  0.4897718 ,  0.49559214,  0.50311521,\n",
              "        0.49738448,  0.50409272,  0.50762827,  0.50276633,  0.48979674,\n",
              "        0.50395664,  0.50750682,  0.49813485,  0.50393287,  0.50135167,\n",
              "        0.50248867,  0.50549089,  0.49910468,  0.48869547,  0.483659  ,\n",
              "        0.4988445 ,  0.49444728,  0.50173833,  0.50138956,  0.49538439,\n",
              "        0.50722536,  0.50926904,  0.51761759,  0.50072297,  0.51564785,\n",
              "        0.50288628,  0.5019176 ,  0.50280899,  0.50570624,  0.49848273,\n",
              "        0.49906922,  0.49637428,  0.50372313,  0.49747726,  0.49854924,\n",
              "        0.50282645,  0.49900071,  0.50255781,  0.49955524,  0.50091175,\n",
              "        0.49856147,  0.4991507 ,  0.49865956,  0.50719415,  0.50333423,\n",
              "        0.50307788,  0.5013827 ,  0.49893059,  0.49637066,  0.49902193,\n",
              "        0.50219045,  0.49672186,  0.50020919,  0.49590192,  0.49978878,\n",
              "        0.49355342,  0.50174024,  0.49777535,  0.49883838,  0.49406748,\n",
              "        0.50494913,  0.49941598,  0.50290277,  0.49916128,  0.50446103,\n",
              "        0.49305223,  0.50321025,  0.50553   ,  0.50553917,  0.49951852,\n",
              "        0.49482346,  0.50668836,  0.50062653,  0.49912425,  0.50112843,\n",
              "        0.497812  ,  0.50310103,  0.49908518,  0.50035425,  0.50289404,\n",
              "        0.503762  ,  0.49875088,  0.49336525,  0.4977649 ,  0.50079824,\n",
              "        0.52348814,  0.51165974,  0.5011542 ,  0.50207152,  0.49626003,\n",
              "        0.50026967,  0.5031376 ,  0.49881171,  0.50257594,  0.50168078,\n",
              "        0.50093196,  0.50584429,  0.50796633,  0.49611298,  0.49922232,\n",
              "        0.50001854,  0.50081625,  0.50124037,  0.50328514,  0.50322166,\n",
              "        0.50595574,  0.50366771,  0.50460928,  0.50127938,  0.49739699,\n",
              "        0.49337093,  0.49678131,  0.49464607,  0.51008533,  0.49504566,\n",
              "        0.50963561,  0.49547162,  0.48937899,  0.50065915,  0.50023765,\n",
              "        0.50303265,  0.49570298,  0.50573664,  0.50252965,  0.49682199,\n",
              "        0.50819834,  0.50140106,  0.50268621,  0.50354595,  0.50485443,\n",
              "        0.4929866 ,  0.49352591,  0.49907509,  0.50552656,  0.4815252 ,\n",
              "        0.4964782 ,  0.51424693,  0.49146895,  0.50879082,  0.49827604,\n",
              "        0.49067612,  0.50607571,  0.50243752,  0.50376066,  0.48631833,\n",
              "        0.50873527,  0.49364767,  0.49251225,  0.50199242,  0.51039786,\n",
              "        0.50612443,  0.47355728,  0.48867624,  0.50431413,  0.51209734,\n",
              "        0.49860809,  0.49230826,  0.4799121 ,  0.49601413,  0.48873244,\n",
              "        0.50984442,  0.50441848,  0.4841932 ,  0.48094661,  0.49954918,\n",
              "        0.48986843,  0.50539502,  0.49913185,  0.51533663,  0.49693532,\n",
              "        0.49784478,  0.51393712,  0.4824567 ,  0.49555208,  0.48577793,\n",
              "        0.50262817,  0.49771831,  0.50111194,  0.50436442,  0.48723696,\n",
              "        0.49628741,  0.50518315,  0.48755834,  0.4899339 ,  0.48448678,\n",
              "        0.48967892,  0.52807093,  0.49741094,  0.50020441,  0.50385582])"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 16,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.hist(norm.cdf(rets), 50, normed=True)\n",
        "plt.grid()\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<matplotlib.figure.Figure at 0x23aeb251ba8>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEACAYAAABbMHZzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAFd9JREFUeJzt3X+MHHd5x/H3EzuYJEDsUOIrJPioqiaBqj0opVCKuJaIX1WTCKG0gFoOKlrKTwF/4KBK6T8VTSVaU9FWoqDYICiEUEFE+RHSeIsAhZQfkQ2BJC09A6E+CiFpI0oI8dM/dh2f7d3z3ezMzc533i9pdTuzOzvf52b2ub3PzO5GZiJJ6pfT2h6AJGnz2fwlqYds/pLUQzZ/Seohm78k9ZDNX5J66JTNPyLeHRErEXFg1bwdEXF9RNwWEZ+KiLNX3XZFRNwREV+PiGc3NXBJUnXreeV/NfCcE+btBm7IzAuAG4ErACLi8cDlwEXA84C/i4iob7iSpDqcsvln5meBH54w+1Jg3+j6PuCy0fVLgA9k5k8zcxm4A3hKPUOVJNWlauZ/bmauAGTmYeDc0fzHAN9edb87R/MkSTOkrgO+fkaEJHXI1orLrUTEzsxciYg54Huj+XcC56+633mjeSeJCP9gSFIFmTn1sdT1vvKP0eWo64Cl0fWXAh9dNf/3IuIhEfE44OeBmyc9aGYWe7nyyitbH4P1W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V3yhqvRZ4b2Z+dHOGvCG1bL/M/B9gP/DcNdfWwEGLLRw7aPEQhgctLlrj/ldzwgFfhnHPS5s8uNJGfQwzvYPAQxm+Yt4LvLrtmuradsCjRj8fC9wKPKLtmjZaH7Bz1fWnAMtVfjddq2/VvHngYNu1NFEf8B7gr9quo4n6gJ8Bzh5dP4PhMbfnr7W+2t/klRPe4BURfzy8Od954iKrJ0Z58cXAH9U9tjpMU19m3hwR1zKMRO4f/Tzx/q2ZdtsBHx69CrkfeFUOX4HMjHXW98KI+BOGNfwfw2NPE5dtpZAJpqkPICLez/Arvh4ZEd8CrszMqze7jkmmqS8ing68BDg4ysUTeEtmfrKNWsaZcvv9LLAvhh+nfxrwwcz8+Frr801ektRDfo2jJPWQzV+SesjmL0k9ZPOXpB6y+UtSD9n8JamHbP6S1EM2f0nqof8HOiL+N9ZZst0AAAAASUVORK5CYII=\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 17,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "file_extension": ".py",
      "version": "3.5.5",
      "pygments_lexer": "ipython3",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "nbconvert_exporter": "python"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "nteract": {
      "version": "0.12.2"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 4
}